import request from '@/utils/request'
// 水机


//获取水机列表
export function getApparatusList(params) {
    return request({
        url: '/apparatus',
        method: 'get',
        params
    })
}
export function getApparatusAllList(params) {
    return request({
        url: '/apparatus/alllist',
        method: 'get',
        params
    })
}
export function getApparatusJundaAllList(params) {
    return request({
        url: '/apparatus/alllistjd',
        method: 'get',
        params
    })
}
export function getApparatusWateRate(params) {
    return request({
        url: '/apparatus/getWateRate',
        method: 'get',
        params
    })
}
export function getUserApparatusAllList(params) {
    return request({
        url: '/apparatus/user/alllist',
        method: 'get',
        params
    })
}

//获取水机详情
export function getApparatusDetail(params) {
    return request({
        url: '/apparatus/detail',
        method: 'get',
        params
    })
}

//添加
export function createApparatus(data) {
    return request({
        url: '/apparatus/create',
        method: 'post',
        data
    })
}

//修改
export function updateApparatus(data) {
    return request({
        url: '/apparatus/update',
        method: 'put',
        data
    })
}

//修改
export function updateBdJdApparatus(data) {
    return request({
        url: '/apparatus/updatedbjd',
        method: 'put',
        data
    })
}


//修改
export function changeFiledStatus(data) {
    return request({
        url: '/apparatus/changeFiledStatus',
        method: 'put',
        data
    })
}


//删除
export function delApparatus(data) {
    return request({
        url: '/apparatus/delete',
        method: 'delete',
        data
    })
}


// 水机详情页


//绑定水机用户
export function apparatusUserBind(data) {
    return request({
        url: '/apparatus/user/bind',
        method: 'post',
        data
    })
}

//查看物业费记录
export function propertyFeeLogs(params) {
    return request({
        url: '/apparatus/prices/logs/property_fee',
        method: 'get',
        params
    })
}

//查看水费记录
export function waterRateLogs(params) {
    return request({
        url: '/apparatus/prices/logs/water_rate',
        method: 'get',
        params
    })
}

//查看电费记录
export function electricLogs(params) {
    return request({
        url: '/apparatus/prices/logs/electricity',
        method: 'get',
        params
    })
}

//设置签约日期
export function apparatusUserSign(data) {
    return request({
        url: '/apparatus/user/sign',
        method: 'post',
        data
    })
}


//填写物业费
export function setPropertyFee(data) {
    return request({
        url: '/apparatus/prices/property_fee',
        method: 'post',
        data
    })
}

//填写电费
export function setElectricity(data) {
    return request({
        url: '/apparatus/prices/electricity',
        method: 'post',
        data
    })
}

//填写水费
export function setWaterRate(data) {
    return request({
        url: '/apparatus/prices/water_rate',
        method: 'post',
        data
    })
}

//填写水费
export function getApparatusWarrantyList(params) {
    return request({
        url: '/apparatus/warranty',
        method: 'get',
        params
    })
}
export function updateApparatusWarranty(data) {
    return request({
        url: '/apparatus/warranty/update',
        method: 'post',
        data
    })
}
